package com.xomily.devops.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xomily.common.annotation.Excel;
import com.xomily.common.core.domain.BaseEntity;

/**
 * 内存日志对象 dev_mem_log
 * 
 * @author xomily
 * @date 2021-11-29
 */
public class DevMemLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 主机id */
    @Excel(name = "主机id")
    private Long hostId;
    
    /** 主机IP地址 */
    @Excel(name = "主机IP地址")
    private String ip;

    /** 合计 */
    @Excel(name = "合计")
    private Long total;

    /** 已用 */
    @Excel(name = "已用")
    private Long used;

    /** 可用 */
    @Excel(name = "可用")
    private Long free;

    /** 使用率 */
    @Excel(name = "使用率")
    private double useRate;

    /** 发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date generateTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setHostId(Long hostId) 
    {
        this.hostId = hostId;
    }

    public Long getHostId() 
    {
        return hostId;
    }
    
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setTotal(Long total) 
    {
        this.total = total;
    }

    public Long getTotal() 
    {
        return total;
    }
    public void setUsed(Long used) 
    {
        this.used = used;
    }

    public Long getUsed() 
    {
        return used;
    }
    public void setFree(Long free) 
    {
        this.free = free;
    }

    public Long getFree() 
    {
        return free;
    }
    public void setUseRate(double useRate) 
    {
        this.useRate = useRate;
    }

    public double getUseRate() 
    {
        return useRate;
    }
    public void setGenerateTime(Date generateTime) 
    {
        this.generateTime = generateTime;
    }

    public Date getGenerateTime() 
    {
        return generateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ip", getIp())
            .append("total", getTotal())
            .append("used", getUsed())
            .append("free", getFree())
            .append("useRate", getUseRate())
            .append("createTime", getCreateTime())
            .append("generateTime", getGenerateTime())
            .toString();
    }
}
